From: Debarshi Ray Date: Fri, 6 Dec 2013 11:56:43 +0000 (+0100) Subject: remoteSearch: Let remote search providers not provide an icon X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~2996 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=c7ff45045c4db0742794003af0eb3f0fae17059a;p=gnome-shell.git remoteSearch: Let remote search providers not provide an icon The documentation indicates that they are optional, so let us make the code behave accordingly. https://bugzilla.gnome.org/show_bug.cgi?id=719965 --- diff --git a/js/ui/remoteSearch.js b/js/ui/remoteSearch.js index 4e7574c5a..05a6ae927 100644 --- a/js/ui/remoteSearch.js +++ b/js/ui/remoteSearch.js @@ -191,7 +191,9 @@ const RemoteSearchProvider = new Lang.Class({ }, createIcon: function(size, meta) { - let gicon; + let gicon = null; + let icon = null; + if (meta['icon']) { gicon = Gio.icon_deserialize(meta['icon']); } else if (meta['gicon']) { @@ -203,8 +205,10 @@ const RemoteSearchProvider = new Lang.Class({ bitsPerSample, width, height, rowStride); } - return new St.Icon({ gicon: gicon, - icon_size: size }); + if (gicon) + icon = new St.Icon({ gicon: gicon, + icon_size: size }); + return icon; }, filterResults: function(results, maxNumber) {